<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="../org/angular.min.js"></script>
    <script src="../org/jquery.min.js"></script>
    <script src="../org/angular-ui-router.min.js"></script>
</head>
<body ng-app='hd'>
    <div>
       <a href="" ui-sref='home2'></a>
       <a href="#/lists">列表页</a>
       <div ui-view>后盾人提示：你访问的页面不存在</div>
    </div>
    <script>
        var m = angular.module('hd',['ui-router']);
        m.config(['$stateProvider','$urlRouterProvider'],function(){
            //默认路由
            $urlRouterProvider.otherwise('');

            $stateProvider.state('default',{
                url: '',
                template: '<h1>default组件</h1>'
            })
            .state('home2',{
                url: '/home',
                template: '<h1>home组件</h1>'
            })
            .state('lists',{
                url: '/lists',
                template: '<h1>lists组件</h1>'
            });
          
        });
    </script>
</body>
</html>